kitura / kitura Goto Github PK
View Code? Open in Web Editor NEWA Swift web framework and HTTP server.
Home Page: http://www.kitura.dev
License: Apache License 2.0
A Swift web framework and HTTP server.
Home Page: http://www.kitura.dev
License: Apache License 2.0
Issue by ricardo-olivieri
Wednesday Jan 06, 2016 at 22:58 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/2
Some of the Swfit code in the net module depends on the SwiftyJSON library. As of now, we cannot get the SwiftyJSON library to compile.
This issue may have to be revisited. For instance, an alternative to SwiftyJSON is the following library (which is written entirely in Swift): https://github.com/Zewo/JSON. Another alrernative is to simply eliminate any dependencies on 3rd party Swift libraries.
Probably the benefits of using SwiftyJSON are negligible. For instance, when compared to the Gson library, SwiftyJSON does not even provide a quarter of the functionality Gson provides.
Issue by dfirsht
Thursday Jan 14, 2016 at 15:45 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/44
Issue by KALLNER
Thursday Jan 07, 2016 at 10:16 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/12
This is the start of an easy to use Swift based API for Redis, with type safe parameters and callbacks.
Issue by KALLNER
Thursday Jan 07, 2016 at 10:18 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/13
Issue by dfirsht
Wednesday Jan 13, 2016 at 17:00 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/40
Currently Phoenix does not conform to the xcode project structure and will not compile in Xcode. We should make it compilable or remove the xcproj file entirely
Issue by ricardo-olivieri
Thursday Jan 07, 2016 at 02:28 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/9
Issue by dfirsht
Friday Jan 15, 2016 at 19:32 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/49
While attempting to compile Chris' custom libdispatch, I ran into an issue with following the install instructions. I don't know what to fill in for the options that end with source=/path/to/10.11.0/... The code that depends on the custom library has been commented out for now
Issue by ricardo-olivieri
Wednesday Jan 06, 2016 at 23:01 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/4
Issue by ricardo-olivieri
Wednesday Jan 06, 2016 at 22:32 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/1
Compile the Phoenix project and all its dependencies using the Swift package manager.
Issue by dfirsht
Wednesday Jan 13, 2016 at 17:01 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/41
The changes made to compile on linux broke OS X compatibility. We should enable compilation on both platforms
Issue by KALLNER
Thursday Jan 07, 2016 at 10:15 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/11
Create a Kitura-router middleware for session management.
The method used for session storage should be pluggable.
The initial one, which is probably the only built-in one, is for in-memory storage.
A nice session storage to have would be around Redis and some No-SQL DB
Issue by dfirsht
Friday Jan 08, 2016 at 22:25 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/26
Issue by ricardo-olivieri
Monday Jan 11, 2016 at 16:19 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/31
Create a Kitura-Router middleware that supports the common forms of over the wire compression.
For the gzip compression we should probably use zLib.
This requires some work in the base router to APIs to add "plugins" that operate in the read/write path.
Issue by ricardo-olivieri
Thursday Jan 14, 2016 at 16:49 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/46
Issue by ricardo-olivieri
Thursday Jan 07, 2016 at 20:08 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/17
More than likely we can use Travis for this: https://travis.innovate.ibm.com/auth
Issue by ricardo-olivieri
Monday Jan 18, 2016 at 22:41 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/50
Given that we now can compile using the swift package manager, let's then update the make file so it has a target that does only what spm cannot do as of now.
Issue by ricardo-olivieri
Tuesday Jan 12, 2016 at 16:11 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/37
Today, the team decided to use a forked version of the swift package manager that supports compilation flags instead of using custom make files.
This will require an additional step after the installation of the swift compiler:
-Cloning forked version of the swift package manager.
-Building and installing the swift package manager.
We will also need to implement this logic as part of the docker image.
Today one can send and receive cookies in Kitura-router via Cookie headers.
It would be nice to have better APIs for doing this, such as:
Our Cookie class in our APIs should NSCookie from foundation, which is already pure Swift.
Issue by rfdickerson
Thursday Jan 14, 2016 at 19:35 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/48
Just a reminder to convert this code over when NSURLSession and others are implemented.
Issue by ricardo-olivieri
Tuesday Jan 12, 2016 at 18:42 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/38
File has been updated accordingly but docker command cannot be found. I just opened a Travis CI issue to track this: https://github.ibm.com/Whitewater/TravisCI/issues/7
Issue by rfdickerson
Thursday Jan 07, 2016 at 21:48 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/19
Currently, the swiftc cannot interpret the proprocessing macros inside of header files such as #define's. For example, I can build my program and builds and can execute,
import CDispatch
let q = dispatch_get_main_queue()
let t = dispatch_time(DISPATCH_TIME_NOW, Int64(5*NSEC_PER_SEC))
dispatch_after(t, q, {
print("hello")
})
dispatch_main()
The Makefile is:
DISPATCH_LIBRARY=-Xcc -fblocks -ldispatch -lpthread -Xlinker -lBlocksRuntime -I Packages/CDispatch-1.0.2
all: main.o
main.o: main.swift
swiftc main.swift ${DISPATCH_LIBRARY}
clean:
rm *.o
The executable runs, waits 5 seconds, and prints hello.
However, if I try to use
DISPATCH_QUEUE_CONCURRENT
The Swift compiler cannot resolve that symbol. This symbol is really a #define, and I suspect the Swift frontend compiler cannot resolve the identifier in any typesafe way since it's just a simple code-replacement.
#define DISPATCH_QUEUE_CONCURRENT \
DISPATCH_GLOBAL_OBJECT(dispatch_queue_attr_t, \
_dispatch_queue_attr_concurrent)
A proposed solution to this problem would be to add to a custom header file a new definition of DISPATCH_QUEUE_CONCURRENT to instead be a constant global variable instead of a C preprocessor directive.
Issue by ricardo-olivieri
Monday Jan 11, 2016 at 16:43 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/32
Samuel will add a link to this work item with further details.
Issue by rfdickerson
Thursday Jan 14, 2016 at 19:17 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/47
This is just to remind us that once Foundation has been finished, we can use NSRegularExpression for native regex matching instead of using an external C library.
Here is the current unimplemented NSRegularExpression
Issue by ricardo-olivieri
Wednesday Jan 13, 2016 at 20:55 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/42
This is an exploratory task (dependent on the libdispatch library) The following is just pseudocode for reference:
backgroundQueue.addOperationWithBlock(clousure1);
backgroundQueue.addOperationWithBlock(clousure2);
Where closure1 is the handler in the router code for processing the http request and http response (code provided at the app level) and closure2 is the next() closure that is used internally by the middleware router layer (not the app).
See the following links for further details:
https://tetontech.wordpress.com/2014/06/30/swift-nsoperationqueues-and-threading/
https://thatthinginswift.com/background-threads/
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSOperationQueue_class/#//apple_ref/occ/instm/NSOperationQueue/addOperationWithBlock
Issue by ricardo-olivieri
Friday Jan 08, 2016 at 16:20 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/24
At first glance, there seems to be Objective-C code in the HttpParser code. Daniel is investigating this and will follow up with Samuel.
Issue by ricardo-olivieri
Thursday Jan 07, 2016 at 22:24 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/20
Issue by KALLNER
Friday Jan 08, 2016 at 11:57 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/22
Add easy to use APIs for Redis List, Set, Sorted set, Transactional List, Transactional Set, and Transactional Sorted set operations.
Issue by ricardo-olivieri
Wednesday Jan 06, 2016 at 23:03 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/5
Issue by ricardo-olivieri
Wednesday Jan 06, 2016 at 23:04 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/6
Also, let's move the test cases for Redis into the new repo for Redis.
The Kitura-router has a helper class that deals with Content-Type headers and mime types.
Currently it supports a small set of hard coded content types.
This list needs to be externalized, akin to what is done in similar functionality in Express. In fact it would be good to adopt their external file of content types and file extensions.
A major issue is where to place this file and how does it stay with the executable if one moves it
Issue by ricardo-olivieri
Thursday Jan 14, 2016 at 15:57 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/45
We were able to get the build to work. For some reason the closed property in FileDescriptor in IO module is being called in the net module.
public private(set) var closed = false
clang ./build/net.o -shared -o ./build/libnet.so
./build/net.o:(.data.rel+0x1200): undefined reference to `_TFC2io14FileDescriptors6closedSb'
./build/net.o:(.data.rel+0x1208): undefined reference to `_TFC2io14FileDescriptorm6closedSb'
/usr/bin/ld: ./build/libnet.so: hidden symbol `_TFC2io14FileDescriptorm6closedSb' isn't defined
Changing it to public is a temporary workaround:
public var closed = false
Issue by ricardo-olivieri
Tuesday Jan 12, 2016 at 00:18 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/35
Similar to WAS Liberty and NodeJS, if there are changes in the binary files, these should be detected and loaded.
Issue by ricardo-olivieri
Monday Jan 11, 2016 at 15:55 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/29
Make sure to remove the custom libdispatch.
Issue by rfdickerson
Wednesday Jan 13, 2016 at 00:25 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/39
Previously, we had httpParserHelper.dylib checked into the repository. However, since it might be bad practice to check in the build dylib into the repository, and we will need a .so file in that directory as well, we should consider how to build this with Swift Package Manager.
We can compile the httpParserHelper "shim" using:
clang -c utils.c -shared -o libhttpParserHelper.so
So that the modulemap can find and link httpParserHelper.so. I think we have 3 options:
Issue by ricardo-olivieri
Thursday Jan 07, 2016 at 22:45 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/21
Issue by ricardo-olivieri
Monday Jan 11, 2016 at 20:34 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/34
Docker hub is a public registry maintained by Docker.
Add to the Kitura router the ability to add error handlers which can be invoked when a handler or middleware indicates that it encountered an error. This error handler could be the part of a server application that creates and returns the error page.
Issue by ricardo-olivieri
Monday Jan 11, 2016 at 15:53 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/28
Let's keep the following dependencies in separate repos: HiRedis, Pcre2, HttpParserHelper, and CurlHelpers. Even though they are in separate repos, we can still make changes locally on our system to test the code without having so push, pull, and test.
Issue by ricardo-olivieri
Wednesday Jan 06, 2016 at 23:24 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/8
Issue by ricardo-olivieri
Wednesday Jan 06, 2016 at 22:59 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/3
Issue by ricardo-olivieri
Thursday Jan 07, 2016 at 21:24 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/18
Given the current limitation we see in Package Manager (i.e. no capabilities to support compilation flags), we are creating a makefile to compile the different dependencies that otherwise would be imported using Package Manager.
Issue by rfdickerson
Thursday Jan 14, 2016 at 01:44 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/43
Phoenix server under Linux does not always gracefully close the socket: Since the socket is not closed always when Ctrl-C is pressed, it causes subsequent runs to not be able to bind to port 8090. We should investigate ways to ensure the socket is closed on termination.
Issue by ricardo-olivieri
Wednesday Jan 06, 2016 at 23:06 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/7
Issue by ricardo-olivieri
Monday Jan 11, 2016 at 16:10 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/30
Issue by ricardo-olivieri
Tuesday Jan 12, 2016 at 06:00 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/36
Issue by dfirsht
Friday Jan 08, 2016 at 22:27 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/27
Issue by KALLNER
Friday Jan 08, 2016 at 12:13 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/23
Currently the binaries created by PhoenixTestingFramework exit after an error is detected.
For continuous integration, the needed functionality is that when an assertion fails, the test running s stopped, while the rest of the tests in that test case and any other tests cases are still executed.
The current XCTest code on which the PhoenixTestingFoundation is based, doesn't have the XCTestExpectation based APIs, neither the class, not the APIs in XCTestCase.
This makes it hard to test asynchronous APIs.
Issue by ricardo-olivieri
Friday Jan 08, 2016 at 19:08 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/25
Given that the current version of Package Manager does not support the functionality we need to successfully build the project on linux, in the meantime, we plan to move these dependencies into the same repo as this project for ease of development.
Issue by ricardo-olivieri
Monday Jan 11, 2016 at 16:50 GMT
Originally opened as https://github.ibm.com/ibmswift/Phoenix/issues/33
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.