Permalink
Browse files

remove everything

  • Loading branch information...
cloudshift committed Aug 10, 2012
1 parent a8feb3f commit 36a83c5c26d85a57da7fce30fc561995813d4f53
Showing with 2 additions and 20,481 deletions.
  1. +2 −169 README.org
  2. +0 −355 cloudshift/Bitcoin.hx
  3. +0 −144 cloudshift/Channel.hx
  4. +0 −257 cloudshift/Core.hx
  5. +0 −98 cloudshift/Data.hx
  6. +0 −124 cloudshift/Http.hx
  7. +0 −739 cloudshift/Mixin.hx
  8. +0 −20 cloudshift/Remote.hx
  9. +0 −67 cloudshift/Session.hx
  10. +0 −578 cloudshift/Sys.hx
  11. +0 −141 cloudshift/Worker.hx
  12. +0 −131 cloudshift/channel/ChanImpl.hx
  13. +0 −36 cloudshift/channel/ClientSinkImpl.hx
  14. +0 −103 cloudshift/channel/Flow.hx
  15. +0 −70 cloudshift/channel/MessageQImpl.hx
  16. +0 −150 cloudshift/channel/PushClientImpl.hx
  17. +0 −256 cloudshift/channel/PushListenerImpl.hx
  18. +0 −46 cloudshift/channel/PushSessionImpl.hx
  19. +0 −68 cloudshift/channel/ServerSinkImpl.hx
  20. +0 −155 cloudshift/channel/SinkImpl.hx
  21. +0 −67 cloudshift/channel/TChannelClient.hx
  22. +0 −78 cloudshift/channel/TChannelServer.hx
  23. +0 −65 cloudshift/core/Context.hx
  24. +0 −226 cloudshift/core/FutureImpl.hx
  25. +0 −277 cloudshift/core/JSGenerator.hx
  26. +0 −112 cloudshift/core/LogImpl.hx
  27. +0 −100 cloudshift/core/ObservableImpl.hx
  28. +0 −122 cloudshift/core/PartBaseImpl.hx
  29. +0 −62 cloudshift/data/RemoteBucketProxy.hx
  30. +0 −34 cloudshift/data/RemoteHashProxy.hx
  31. +0 −223 cloudshift/data/RemoteSqlite3Client.hx
  32. +0 −93 cloudshift/data/Sqlite3BHash.hx
  33. +0 −378 cloudshift/data/Sqlite3Bucket.hx
  34. +0 −73 cloudshift/data/Sqlite3Store.hx
  35. +0 −25 cloudshift/externs/Sqlite3.hx
  36. +0 −323 cloudshift/http/HttpImpl.hx
  37. +0 −146 cloudshift/http/Mime.hx
  38. +0 −226 cloudshift/http/Neko.hx
  39. +0 −50 cloudshift/http/RemoteImpl.hx
  40. +0 −83 cloudshift/session/SessionClientImpl.hx
  41. +0 −99 cloudshift/session/SessionMgrImpl.hx
  42. +0 −18 cloudshift/session/SessionMgrProxy.hx
  43. +0 −104 cloudshift/sys/ChildProcessImpl.hx
  44. +0 −21 cloudshift/sys/Events.hx
  45. +0 −145 cloudshift/sys/ProcessImpl.hx
  46. +0 −60 cloudshift/sys/ReadStreamImpl.hx
  47. +0 −55 cloudshift/sys/WriteStreamImpl.hx
  48. +0 −65 cloudshift/worker/Context.hx
  49. +0 −67 cloudshift/worker/StdioAsyncConnection.hx
  50. +0 −690 haxe/Http.hx
  51. +0 −8 haxelib.xml
  52. +0 −99 usage/bitcoin/Btc.hx
  53. +0 −13 usage/bitcoin/build.hxml
  54. +0 −77 usage/chat/ChatClient.hx
  55. +0 −115 usage/chat/ChatServer.hx
  56. +0 −17 usage/chat/ChatTypes.hx
  57. +0 −93 usage/chat/ChatUi.hx
  58. +0 −25 usage/chat/build.hxml
  59. +0 −17 usage/chat/certificate.pem
  60. +0 −15 usage/chat/privatekey.pem
  61. +0 −35 usage/chat/www/index.html
  62. +0 −6 usage/data/Makefile
  63. +0 −35 usage/data/RemoteClient.hx
  64. +0 −27 usage/data/RemoteSource.hx
  65. +0 −23 usage/data/build.hxml
  66. +0 −35 usage/http/HttpTest.hx
  67. +0 −3 usage/http/Makefile
  68. +0 −8 usage/http/build.hxml
  69. +0 −17 usage/http/certificate.pem
  70. +0 −12 usage/http/certrequest.csr
  71. +0 −15 usage/http/privatekey.pem
  72. +0 −3,728 usage/http/test.js
  73. +0 −5 usage/http/www/index.html
  74. +0 −32 usage/remotes/Client.hx
  75. +0 −38 usage/remotes/Server.hx
  76. +0 −17 usage/remotes/build.hxml
  77. +0 −4,475 usage/remotes/server.js
  78. +0 −3,562 usage/remotes/www/client.js
  79. +0 −10 usage/remotes/www/index.html
  80. +0 −62 usage/sys/TestFs.hx
  81. +0 −7 usage/sys/build.hxml
  82. +0 −13 usage/worker/OtherProcess.hx
  83. +0 −31 usage/worker/Test.hx
  84. +0 −12 usage/worker/build.hxml
View
@@ -1,171 +1,4 @@
* Cloudshift - A haXe Stack for Node.js
Cloudshift is now known as Flux and can be found at
See [[http://www.cloudshift.cl][cloudshift.cl]] for full documentation.
Cloudshift is written and maintained by Ritchie Turner (blackdog@cloudshift.cl)
and is currently under heavy development; the apis are subject to change.
** Core Module
Cloudshift provides a consistent set of abstractions on client and server for
dealing with common problems;
- *Asynchronous haXe remoting* for inter tier and sub-process communication
- *Outcome<A,B>* (a Future<Either<A,B>>) as the means for dealing with
async callback hell and error handling with helper functions provided as Mixins.
- *Parts* are components which have an asynchronous new() in the start()
method - start() and an optional asynchronous stop(). Parts are also
Observable.
- *Mixins*, mostly the Stax prelude extensions with extensions for Parts and
Outcomes.
- *Observables* - Typical observer functionality.
** Http Module
Simplest example ...
#+BEGIN_SRC haxe
Http.server()
.root("/dir/to/serve")
.start({host:"localhost",port:8080});
#+END_SRC
and/or provide multiple handlers per url, e.g.
#+BEGIN_SRC haxe
Http.server().handler(~/^\/remotes/,rem.httpHandler)
#+END_SRC
For haXers a limited Neko api is also supported on handler req/resp objects to get
you going.
** Channel Module
Publish/subscribe with session management, channel security. Currently a Push
implementation (web socket conduit will be added).
#+BEGIN_SRC haxe
Http.server().root("www").start({host:"localhost",port:8082})
.outcome(function(http) {
Session.manager().start(http)
.outcome(function(sess:SessionMgr) {
sess.authorize(sessAuth);
Channel.server()
.addChannelAuth(channelAuth)
.start(sess).outcome(startRooms);
});
});
#+END_SRC
Once you have your client or server, you may get a channel and pub/sub
#+BEGIN_SRC haxe
function startRooms(channelServer:ChannelServer) {
channelServer.channel("/chat/room").outcome(function(room) {
room.pub("blah");
room.sub(function(msg) {
});
});
#+END_SRC
** Data Module
There is a database component with, so far, one driver, Sqlite3. The api is
asynchronous and NoSQL where objects are stored in "buckets". JSON is the
default storage format but you may add serializers per bucket if you prefer to
store haXe serialized objects or anything else.
Data provides a general indexing facility which utilises the underlying sqlite
indexes. Objects are relatable and queryable across buckets.
The Sqlite driver is a popular C++ module for Node.js supported by many of the
leading names in the Node.js community. It's asynchronous and embedded in
the node.js instance.
So, each Cloudshift instance has it's own database, this can be easily augmented
so that each instance running talks to a central Cloudshift instance just
running data services. Cloudshift provides a remote api compatible driver for
this purpose.
#+BEGIN_SRC haxe
Data.store(REMOTESQLITE("http://localhost:8082/data")).outcome(function(store) {
store.bucket("woot").outcome(function(woot) {
woot.where('name="lore"').outcome(function(recs) {
trace(recs.stringify());
});
woot.insert({email:"lorena@ritchie.com",name:"lore",passwd:"and why not"})
.outcome(function(u) {
trace("lore's id = "+Data.oid(u));
});
});
#+END_SRC
Data also supplies a persistent hash.
*The main point here is to think of the Node.js/Sqlite3 combination as a
database server in it's own right*
** Worker Module
Extend Worker and create seamless sub process workers using the haXe remoting
protocol.
** Sys Module
File I/O, Process services wrapped in Outcomes as appropriate for this kind
of usage:
#+BEGIN_SRC haxe
Sys.writeFile("woot","hi there")
.oflatMap(function(file) {
return file.stat();
})
.omap(function(stat) {
return stat.path;
})
.oflatMap(function(path) {
return path.rename("niceone");
})
.outcome(function(newFileName) {
trace("cool "+newFileName);
var p = Sys.events();
p.observe(function(o) {
switch(o) {
case ProcessUncaughtException(ex):
trace("uuncauthg exp:"+ex);
default:
}
});
trace(Sys.argv());
trace(Sys.title());
trace("osuptime:"+Sys.osUptime()+", uptime:"+Sys.uptime());
});
#+END_SRC
* Installation and Dependencies
install node.js for your platform
- npm install formidable
- npm install sqlite3
- haxelib install nodejs
- haxelib install cloudshift
Note, the cloudshift haxelib does not include the nodejs dependency by
default, as the cloudshift lib is used on both client and server having
the -D nodejs defined automatically on the client is an unwanted side
effect. So be sure to install nodejs bindings manually.
- Formidable is the node.js POST multipart handler. (https://github.com/felixge/node-formidable)
- Sqlite3 - not be available on Windows (https://github.com/developmentseed/node-sqlite3)
- nodejs (https://github.com/cloudshift/hx-node)
<a src="http://github.com/async_cl/flux">http://github.com/async_cl/flux</a>
Oops, something went wrong.

0 comments on commit 36a83c5

Please sign in to comment.