christian-thiele / datahub Goto Github PK
View Code? Open in Web Editor NEWA Cloud Development Ecosystem aiming to bring the power of Dart into the Cloud.
Home Page: https://datahubproject.net
License: Apache License 2.0
A Cloud Development Ecosystem aiming to bring the power of Dart into the Cloud.
Home Page: https://datahubproject.net
License: Apache License 2.0
-> ACK
in datahub test cli command check if docker-compose file exists, if not treat like --no-compose
Migrations should use transactions to not leave database in irrecoverable state after migration failed somewhere
Use TransferObjectBase instead of TransferObjectBase
Use
void getId() {}
instead of
Null getId() => null;
insert
// ignore_for_file: constant_identifier_names
into dto.g.dart files
Officially host dart_amqp fork for datahub and use it in datahub.
Features include:
Only options right now are getParam / getParamInt.
Should be getParam() with proper codec
lists are typed with YamlList which does not match List when querying config values.
not convenient
Shortcut for
resolve<ConfigService>().environment
make fields and databean safer by using a type constraint
property authProvider in ApiService is legacy, not used
Current config design pattern is not suitable for config files most commonly used in cloud native environments
Not really needed for modern use cases
Check for datahub config often throws (caught) exceptions that are annoying when debugging.
Check before fetching and avoid exceptions.
It can be confusing that generated code (BrokerApi) has a "hidden" dependency on amqp lib.
This should be exported by broker.dart to avoid multiple necessary imports
desired log level can not yet be configured (everything is printed by LogService)
Database transaction support.
Method call on connection with delegate.
If delegate throws, rollback. Maybe also add cancellation token or something?
Maybe no need to throw, can be call on callback but lets see
Config / Param fetching could be the same pattern
ServiceHost -> ApplicationHost
remove dependency comment in pubspec.yaml
remove exit(0); from main
Decode route params like query params at Route.getParam
Probably an error in ValueExpression with List / Iterable types
When docker build has an error, only verbose mode shows failure, non-verbose just shows "running" indefinitely.
Dto fields and enum values are serialized by field name. Breaking dart field name conventions is not a good practice when wanting to set other serialization values. Provide annotation stuff.
Request body data should be streamed so that large files can be rejected by header data or size or whatever inside the request handler!
Dao type can then be inferred for methods like query(DataLayout) etc. to prevent the Invalid dao type "dynamic" bug in client code.
Check if it would be benefitial to constraint the TData type on HubResource types to the specific TransferObjectBase.
Pro:
Add PropertyCompareType.In that checks if field value is in list.
SQL: field in ( , , , )
lat var not initialized when no config variable for environment exists
"native" JWT parse / verify / issue utilities
Because of security, internal error causes are not sent to the client. In debug mode this should be different to make debugging easier.
Logging is currently done using print statements across the code.
Ugly af
some way to configure custom certificates for amqp service
"Missing value" is not always helpful
import 'some_dto.dart' as some;
@TransferObject()
class MyDto extends _TransferObject {
final some.SomeDto child;
MyDto(this.child);
}
Generated code does not use named type which results in compile time error.
// TODO while we escape values, we don't need to worry about substitution values // TODO but that's probably not the best way, lets think of some sort of system that // TODO let's us use substitutions without clashing names // @CTH by CTH: maybe provide a "namespace" to methods like this to avoid // clashing names?
See sql_builder.dart
equals / notEquals is a nice pattern, other CompareTypes are not included tho. results in a lot of tedious code
Rethrow results in exception being printed twice, once by logservice, once not. Also, servicehost is not able to shutdown services in this case.
Instead: show exception through logservice, shutdown gracefully and end application with error code.
If present
request.requestedUri in api_service.dart:71 can throw if uri is invalid, replace or catch
"Failed to create socket" exceptions are unhandled!
Catch in ApiService.initialize
Allow users to define a base path at the ApiBase (like /api/v1)
Problem arises when using invalid field names inside the default dto constructor or when unmapping dao objects.
Invalid fields or wrong types are possible.
-> Security issue!
base_broker_api_service.dart:50
initializeFanOutExchange
missing line:
_channels.add(channel);
cookies
'Basic ' instead of 'Bearer '
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.