forceuniverse / dart-force Goto Github PK
View Code? Open in Web Editor NEWDart Realtime Web Framework!
Home Page: https://pub.dartlang.org/packages/force
License: Other
Dart Realtime Web Framework!
Home Page: https://pub.dartlang.org/packages/force
License: Other
force_sendable.dart Line 19
log.info("breadcasting ... to $key");
should be
log.info("broadcasting... to $key");
Just for a start I would like to see the Dart source for a simple "Hello" example server that responds with "Hello Foo" when it receives a "Foo" message. I could not figure that out from the instructions on the Pub page. Thanks.
Having to build in development is not very practical. Is it possible to serve the files in the /web
directory directly? If not, it should be a feature.
I want to use timer to send data to the client for every 3 seconds after websocket connection has been establish .
I don't know to how to do this use dart-force !! Is there any example for reference ???
Let us look at the how a clientside DB api should look like.
It would be nice to provide a reply method, so you can just call
sender.reply('received', data);
instead of
sender.sendTo(fme.wsId, 'received', data);
Add @receivable and @receiver annotations in forceclient so we can use these annotations on that side!
Hi,
I actually use dart-force for my project, and i'm in a situation where getting the possibility of connecting 2 server together would be nice.
I don't know if it's in the "philosophy" of this library or not. but for me it will be nice.
Hi, I was just wondering if it was possible to send file/data other than strings through the use of forceServer.send(). If possible, would you be able to typecast the object once it reached the client? I figured once it is serialized you would have to do a conversion afterwards.
If the browser doesn't support WebSocket then use long polling as a last resort and setup automatically.
Hi,
I saw this in an example:
forceClient.on("notifications"
Using strings can get us into trouble (hard to check with tools, too easy to misspell, no code completion)
Instead, can we do this:
forceClient.onNotifications.listen((e) => ...
Thanks!
Mentioned as a long term goal but has no issue associated with it. Appears that the client is allowed to set profile setting and no current hook to valid it nor what topics can be subscribed to and by whom.
Hi,
Actually, dart-force use it's own http server implementation for ForceServer.
Is it planned to allow a user to provide its own implementation (like a parameter in the creation of ForceServer) ?
start long polling server ... /ws/polling Uncaught Error: SocketException: OS Error: An invalid argument was supplied.
I believe its the case that in your simple_web_server.dart line13
you need to choose InternetAddress.ANY_IP_V4
for windows systems.
Saw that your tictactoe example uses a server.register method but there is no documentation of how to properly use it.
Hello, I personallly don't like using mustache as view rendering engine, however I would like to know if this framework supports jasmine. does it?
There is the ability to serve files but would be desirable to have a way to set a publicly accessible folder(s). A default to ../web probably makes the most sense.
A raw value has been left in the code:
part of dart_force_server_lib;
class ServerSocketConnector extends Connector {
int port;
String address;
StreamController _controller;
ServerSocketConnector({this.address: '127.0.0.1', this.port: 4041}) {
_controller = new StreamController();
}
Future start() {
ServerSocket.bind(this.address, 4041) // Just here
.then((serverSocket) {
serverSocket.listen((socket) {
_controller.add(new ServerSocketWrapper(socket));
});
});
return _completer.future;
}
}
Currently there is no routing support for a ForceServer. There are times even when using websockets that you can't avoid REST urls (for example when working with external APIs like paypal) for use as redirects. Are there any plans to support routing in Force?
When the connection is lost with the server, we are going to store all the socket events into websql or localstorage.
Whenever the connection is back established the events will be fired in the same order. So you can bring the state of the client back in order with the server.
We will use Cargo for this.
So we will have a keep alive connection with our clients!
Support for non-websocket enabled browsers is mentioned as a long term goal but has no issue associated with it.
I have this minimal code and I keep getting
INFO: default: "GET /_ah/health?IsLastSuccessful=no HTTP/1.1" 503 -
WARNING: All instances may not have restarted
when I try to start the local server. Here is the code
server.dart
library force_angular;
import 'package:force/force_serverside.dart';
import 'package:forcemvc/force_mvc.dart';
import 'package:mustache4dart/mustache4dart.dart';
import 'package:appengine/appengine.dart';
main() {
// Create a force server
ForceServer fs = new ForceServer();
runAppEngine(forceServer.requestHandler).then((_) {
// Setup logger
fs.setupConsoleLog();
// we need to change {{ into [[ because of angular
if (fs.server.viewRender is MustacheRender) {
MustacheRender mustacheRender = fs.server.viewRender;
mustacheRender.delimiter = new Delimiter('[[', ']]');
}
// Tell Force what the start page is!
fs.server.use("/", (req, model) => "angularforce");
});
}
angularforce.html
<!DOCTYPE html>
<html ng-app>
<head>
<title>Hello World GAE</title>
</head>
<body>
<h1>Hello HTML</h1>
<script type="applicataion/dart" src="angularforce.dart"></script>
<script type="text/javascript" src="packages/browser/dart.js"></script>
</body>
</html>
angularforce.dart
import 'package:angular/angular.dart';
import 'package:angular/application_factory.dart';
void main() {
applicationFactory()
.run();
}
I had actually started my own Dart websocket based client/server thing (codenamed javelin). Its does some acks and registration steps to allow things like automatic configurable RC4 encryption.
It that something you might want to include in force if I gave you the code?
We need to add a new event that will listen to changes in the profile data coming from the client
How about, instead of:
forceClient.onConnecting.listen((e) {
if (e.type=="connected") {
...
} else if (e.type=="disconnected") {
...
}
});
The forceClient can return a Future that completes when the connection is complete. I'd like to try to avoid checking types against strings if possible. Hard to spellcheck and refactor and statically analyze.
Check the WebSocket class for some inspiration on how to deal with a connection that completes and disconnects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.